﻿using SqlSugar;
using System;

namespace WebApi.Model
{
    [SugarTable("t_WeightRecord")]
    public class WeightRecord
    {
        /// <summary>
        /// 编号
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 数据标识
        /// </summary>
        public string Guid { get; set; }

        /// <summary>
        /// 磅单编号
        /// </summary>
        public string RecordId { get; set; }

        /// <summary>
        /// 汽车衡编号
        /// </summary>
        public string ScaleCode { get; set; }

        /// <summary>
        /// 汽车衡名称
        /// </summary>
        public string ScaleFlag { get; set; }

        /// <summary>
        /// 车牌号
        /// </summary>
        public string TruckNum { get; set; }

        /// <summary>
        /// 毛重时间
        /// </summary>
        public DateTime? GrossTime { get; set; }

        /// <summary>
        /// 毛重
        /// </summary>
        public decimal? GrossWeight { get; set; }

        /// <summary>
        /// 毛重称重人员
        /// </summary>
        public string GrossUser { get; set; }

        /// <summary>
        /// 后台监督人员毛重
        /// </summary>
        public decimal? SuperviseGrossWeight { get; set; }

        /// <summary>
        /// 皮重时间
        /// </summary>
        public DateTime? TareTime { get; set; }

        /// <summary>
        /// 皮重
        /// </summary>
        public decimal? TareWeight { get; set; }

        /// <summary>
        /// 皮重称重人员
        /// </summary>
        public string TareUser { get; set; }

        /// <summary>
        /// 后台监督人员皮重
        /// </summary>
        public decimal? SuperviseTareWeight { get; set; }

        /// <summary>
        /// 净重
        /// </summary>
        public decimal? NetWeight { get; set; }

        /// <summary>
        /// 扣重
        /// </summary>
        public decimal? Discount { get; set; }

        /// <summary>
        /// 完成标识
        /// </summary>
        public int IsComplete { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 上传状态
        /// </summary>
        public int UpdateState { get; set; } = 0;

        /// <summary>
        /// Rfid卡号
        /// </summary>
        public string Rfid { get; set; }

        /// <summary>
        /// 驾驶人姓名
        /// </summary>
        public string DriverName { get; set; }

        /// <summary>
        /// <summary>
        /// 货物名字
        /// </summary>
        public string GoodsName { get; set; }

        /// <summary>
        /// 件数
        /// </summary>
        public string HangNum { get; set; }

        /// <summary>
        /// 发货皮重
        /// </summary>
        public string Place { get; set; }

        /// <summary>
        /// 折扣率
        /// </summary>
        public decimal? DiscountRate { get; set; }

        /// <summary>
        /// 存储件数
        /// </summary>
        public decimal? Price { get; set; }

        /// <summary>
        /// 铜粉存储发货净重，阴极铜存储检化验系统获取净重(如取到)
        /// </summary>
        public decimal? Money { get; set; }

        /// <summary>
        /// 发货毛重
        /// </summary>
        public string Specifications { get; set; }

        /// <summary>
        /// 发货单位
        /// </summary>
        public string SendCptName { get; set; }

        /// <summary>
        /// 运输单位
        /// </summary>
        public string TransportCptName { get; set; }

        /// <summary>
        /// 收货单位
        /// </summary>
        public string ReceiveCptName { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int? State { get; set; }

        //此处有6个图片字段和1个图片上传状态字段未写

        /// <summary>
        /// 前半条数据保存时集控登录人员
        /// </summary>
        public int? UserId1 { get; set; }

        /// <summary>
        /// 完整数据保存时集控登录人员
        /// </summary>
        public int? UserId2 { get; set; }

        /// <summary>
        /// 卡类型 1-入厂，2-出厂，3-厂内流转
        /// </summary>
        public int? CardType { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Predefined1 { get; set; }

        /// <summary>
        /// 客户类型
        /// </summary>
        public string Predefined2 { get; set; }

        /// <summary>
        /// 汽车衡类型：0（普通汽车衡），1（硫酸），2（铜粉磅:包括铜粉和多种货物；铜粉磅需要监磅，接口保存数据时需要更新监磅表），3（阴极铜）
        /// </summary>
        public string Predefined3 { get; set; }

        /// <summary>
        /// 当前登录人员Id
        /// </summary>
        public string Predefined4 { get; set; }

        /// <summary>
        /// 制单人员用户Id（汽车衡使用）
        /// </summary>
        public string Predefined5 { get; set; }

        /// <summary>
        /// 监磅人员用户Id（汽车衡使用）
        /// </summary>
        public string Predefined6 { get; set; }

        /// <summary>
        /// 第二次称重时登录用户名（当前登录人用户名）
        /// </summary>
        public string Predefined7 { get; set; }

        /// <summary>
        /// 当前司机手机号
        /// </summary>
        public string Predefined8 { get; set; }

        /// <summary>
        /// 磅差，计算公式：净重-捆重*捆数-发货净重
        /// </summary>
        public string Predefined9 { get; set; }

        /// <summary>
        /// 捆重，铜粉分为1kg和2kg，阴极铜1kg
        /// </summary>
        public string Predefined10 { get; set; }

        /// <summary>
        /// 当前设置的磅差限值
        /// </summary>
        public string Predefined11 { get; set; }

        /// <summary>
        /// 火车皮号
        /// </summary>
        public string Predefined12 { get; set; }

        /// <summary>
        /// 批次
        /// </summary>
        public string Predefined13 { get; set; }

        /// <summary>
        /// 是否是离线数据（汽车衡本地用）
        /// </summary>
        public string Predefined14 { get; set; }

        /// <summary>
        /// 平板监磅Id
        /// </summary>
        public string Predefined15 { get; set; } = "0";

        /// <summary>
        /// 固废上传状态
        /// </summary>
        public short? GuFeiUploadState { get; set; }

        /// <summary>
        /// 发货皮重差
        /// </summary>
        public decimal? TareDistance { get; set; }

        /// <summary>
        /// 发货毛重差
        /// </summary>
        public decimal? GrossDistance { get; set; }
    }
}